﻿@model List<JewererBasic.WASTE_REPORT>

<h2>Report Waste</h2>

<a href="/WasteReport/CreateReport">
    <input type="button" value="Make Report" />
</a>
<a href="/Report/ExportReportCurentWaste">
    <input type="button" value="Show Current Waste" id="btnCurrentWaste" />
</a>


<div id="divCurrentWaste">

</div>
@using (Html.BeginForm())
{
    if(Model.Count>0){
    <strong class="myStrong">List Waste Report</strong>
    <table class="table">
        <tr>
            <th>Report Id 
            </th>
            <th>Date
            </th>
            <th>Total Worker
            </th>
            <th>Total Weight
            </th>
        </tr>
        @foreach (var item in Model)
	    {
            <tr>
                <td>
                    @Html.DisplayFor(modelItem=>item.Id)
                </td>
                <td>
                    @Html.DisplayFor(modelItem=>item.DateMake)
                </td>
                <td>
                    @Html.DisplayFor(modelItem=>item.Total_Staff)
                </td>
                <td>
                    @Html.DisplayFor(modelItem=>item.Total_Weight)
                </td>
                <td>
                    @Html.ActionLink("Detail", "Detail", new {waste_report_id=item.Id})
                </td>
            </tr>        
	    }
    </table>
    }
}
@section Scripts{
    <script type="text/javascript">
        //$('#btnCurrentWaste').click(function(){
        //    $.ajax({
        //        url: '/WasteReport/GetCurrentWaste',
        //        dataType: 'html',
        //        success: function (data) {
        //            $('#divCurrentWaste').html(data);
        //        }
        //    });
        //});
    </script>
}